package socilgirl.dell.mydemo.httpmanager.utils;


import java.lang.reflect.Type;

import socilgirl.dell.mydemo.httpmanager.HttpManagerConstant;

/**
 * Created by ${小强} on 2017/10/27.
 */

public class HttpUtils {
    /**
     * 判断是否字符串
     *
     * @param genericityType
     * @return
     */
    public static boolean isString(Type genericityType) {
        boolean isString = false;
        if (genericityType instanceof Class) {
            switch (((Class) genericityType).getSimpleName()) {
                case HttpManagerConstant.OBJECT:
                    isString = true;
                    break;
                case HttpManagerConstant.STRING:
                    isString = true;
                    break;
                default:
                    break;
            }
        } else {
            isString = true;
        }
        return isString;
    }
}
